﻿Partial Public Class WebFormDetails
    Inherits System.Web.UI.Page


    Public _db As New hc_databaseDataContext

    Public Artlist() As String




    Protected Sub KundeIDSession(ByVal ID As Integer)
        Session("KundeID") = ID

    End Sub


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      
        Dim KID As Integer = Session("KundeID")


        Dim kundenname = (From K In _db.Kundes Where K.ID = KID Select K.Name).First

        '   formviewdetail.DataBind()

        lblUeberschrift.Text = "Details von " & kundenname

        Dim rang As Integer
        rang = Session("Rangid")

        'wenn der Nutzer ein PM oder VP ist
        If rang <= 2 Then

            FVKunde2.FindControl("deletebutton").Visible = True
            FVKunde2.FindControl("editbutton").Visible = True

        Else

            FVKunde2.FindControl("deletebutton").Visible = False
            FVKunde2.FindControl("editbutton").Visible = False



        End If

    End Sub







End Class